#include "widget.h"
#include "ui_widget.h"
#include<QPushButton>
#include<QDebug>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    QPushButton*btn=new QPushButton(this);
    connect(btn,&QPushButton::clicked,[=](){this->close(); });
   // disconnect(btn,&QPushButton::clicked,this,&Widget::close);
    ui->setupUi(this);
//    [btn](){
//        btn->setText("你好");
//    }();
    //int a=10;
    //[a]()mutable->int{a+=100;qDebug()<<a;}();

}

Widget::~Widget()
{
    delete ui;
}

